package com.lagou.service.impl;

import com.lagou.service.TestService;
import org.apache.dubbo.config.annotation.Service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

@Service
public class TestServiceImpl implements TestService {
    public Random r = new Random();

    @Override
    public String test1() {
        try {
            Thread.sleep(r.nextInt(100)+1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "第一项任务完成";
    }

    @Override
    public String test2() {
        try {
            Thread.sleep(r.nextInt(100)+1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "第二项任务完成";
    }

    @Override
    public String test3() {
        try {
            Thread.sleep(r.nextInt(100)+1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "第三项任务完成";
    }
}
